import request from "@/utils/request";

export function getUserChannel() {
    return request({
        url: '/v1_0/user/channels',
    })
}

export function getNewsList(params) {
    return request({
        url: '/v1_0/articles',
        params
    })
}

export function getArticle(art_id) {
    return request({
        url: `/v1_0/articles/${art_id}`,
    })
}

export function followAuthor(data) {
    return request({
        url: '/v1_0/user/followings',
        method: 'POST',
        data
    })
}

export function unfollowAuthor(aut_id) {
    return request({
        url: `/v1_0/user/followings/${aut_id}`,
        method: 'DELETE',
    })
}